﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace XChip_Common
{
    public class TipsHelper
    {

        public static string CStoModelCS(string chuanshu01)
        {
            string str = string.Empty;
            if (chuanshu01.Contains("0d110a")) //ahd
            {
                str = "AHD";
            }
            else if (chuanshu01.Contains("19241c0b1f0c"))
            {
                str = "CVBS P";
            }
            else if (chuanshu01.Contains("17241c0b1f0c"))
            {
                str = "CVBS N";
            }
            else if (chuanshu01.Contains("1c0b1f0c"))//cvbs
            {
                str = "CVBS";
            }
            else if (chuanshu01.Contains("121f0c"))//CHD
            {
                str = "CHD";
            }
            else if (chuanshu01.Contains("121f1d"))//THD
            {
                str = "THD";
            }
            else
            {
                str = string.Empty;
            }

            return str;
        }

        public static string ZStoModelZS(string zhishi01)
        {
            if (zhishi01.Contains("150a19"))//pal
            {
                return "pal";
            }
            else if (zhishi01.Contains("0c1c1d17"))//ntsc
            {
                return "ntsc";
            }
            else
            {
                return string.Empty;
            }
        }

        public static string CCtoModelCC(string chicun01)
        {
            if (chicun01.Contains("1925082501"))//1080p
            {
                return "1080p";
            }
            else if (chicun01.Contains("192502071c"))
            {
                return "scale720p";
            }
            else if (chicun01.Contains("19250207"))//720p
            {
                return "720p";
            }
            else
            {
                return string.Empty;
            }
        }

        public static string ForMatToString(string str) {
            if (str.Contains("25031925082501"))
            {
                return "1080P30";
            }
            else if (str.Contains("05021925082501"))
            {
                return "1080P25";
            }
            else if (str.Contains("05011925082501"))
            {
                return "1080P15";
            }
            else if (str.Contains("250319250207"))
            {
                return "720P30";
            }
            else if (str.Contains("050219250207"))
            {
                return "720P25";
            }
            else if (str.Contains("05021604"))
            {
                return "4M25";
            }
            else if (str.Contains("25031604"))
            {
                return "4M30";
            }
            else if (str.Contains("02011605"))
            {
                return "5M12";
            }
            else if (str.Contains("25021605"))
            {
                return "5M20";
            }
            else if (str.Contains("052402011605"))
            {
                return "5M12_5";
            }
            else if (str.Contains("25021604"))
            {
                return "4M20";
            }
            else if (str.Contains("250611250609"))
            {
                return "960H60";
            }
            else if (str.Contains("250511250609"))
            {
                return "960H50";
            }
            else if (str.Contains("250611250207"))
            {
                return "720H60";
            }
            else if (str.Contains("250511250207"))
            {
                return "720H50";
            }
            else if (str.Contains("250611250804"))
            {
                return "480H60";
            }
            else if (str.Contains("250511250804"))
            {
                return "480H50";
            }
           
            else
            {
                return string.Empty;
            }
        }
    }
}
